package com.patterns.decorator.schoolReport;

/**
 * Created by Xiao Yiyun on 2017/5/18.
 * 最高成绩修饰类
 */
public class HighScoreDecorator extends Decorator {
    //构造函数，调用父类的构造函数即可
    public HighScoreDecorator(SchoolReport schoolReport) {
        super(schoolReport);
    }
    //汇报最高成绩
    private void reportHighScore() {
        System.out.println("这次最高成绩是……");
    }
    //修饰以后才汇报
    public void report() {
        this.reportHighScore();
        super.report();
    }
}
